home *** CD-ROM | disk | FTP | other *** search
- on TheinitCursor
- initCursorCastNum()
- initCursorList()
- set CursorCastNum to getCursor(2)
- cursor([CursorCastNum, CursorCastNum + 1])
- end
-
- on setDefaultCursor
- set cursorList to getCursorList()
- set counter to count(cursorList)
- repeat with i = 1 to counter
- set currItem to getAt(cursorList, i)
- if currItem <> 0 then
- set CursorCastNum to getCursor(currItem)
- set the cursor of sprite i to [CursorCastNum, CursorCastNum + 1]
- end if
- end repeat
- end
-
- on UpdateCursors theSp, theCursor
- global cursorList
- setAt(cursorList, theSp, theCursor)
- if theCursor = 0 then
- set the cursor of sprite theSp to theCursor
- else
- set CursorCastNum to getCursor(theCursor)
- set the cursor of sprite theSp to [CursorCastNum, CursorCastNum + 1]
- end if
- end
-
- on setEmptyCursor
- set cursorList to getCursorList()
- set counter to count(cursorList)
- repeat with i = 1 to counter
- set currItem to getAt(cursorList, i)
- if currItem <> 0 then
- set the cursor of sprite i to 0
- setAt(cursorList, i, 0)
- end if
- end repeat
- end
-
- on setCursorTool int
- global CursorTool
- set CursorTool to int
- end
-
- on initCursorCastNum
- global CursorCastNum
- set CursorCastNum to "400,402,404,406"
- end
-
- on getCursor cursorNum
- global CursorCastNum
- return integer(item cursorNum of CursorCastNum)
- end
-
- on initCursorList
- global cursorList
- set cursorList to [0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 0, 3]
- setDefaultCursor()
- end
-
- on getCursorList
- global cursorList
- return cursorList
- end
-
- on switchButton spriteNum, castDown, macroName
- set flag to 0
- set SaveCast to the castNum of sprite spriteNum
- set flag to swapCast(spriteNum, SaveCast, castDown)
- repeat while the stillDown
- set flag to swapCast(spriteNum, SaveCast, castDown)
- end repeat
- if flag = 1 then
- do(macroName)
- end if
- end
-
- on swapCast spriteNum, SaveCast, castDown
- if rollOver(spriteNum) then
- set the castNum of sprite spriteNum to the number of cast castDown
- updateStage()
- return 1
- else
- set the castNum of sprite spriteNum to the number of cast SaveCast
- updateStage()
- return 0
- end if
- end
-